#!/usr/bin/python
# -*- encoding:utf-8 -*-


class DemoDemo:
    def fabonacci(self, n):
        if n == 0:
            return 0
        elif n == 1:
            return 1
        else:
            return self.fabonacci(n - 1) + self.fabonacci(n - 2)

    def _test_fabonacci(self, operation):
        """
        dd = DemoDemo()
        dd._test_fabonacci(dd.fabonacci(5))
        """
        print operation

    def _test_multiplytable(self):
        """
        dd = DemoDemo()
        dd._test_multiplytable()
        """
        for i in range(1, 10):
            for j in range(1, i + 1):
                print str(i) + ' * ' + str(j) + ' = ' + str(i * j) + '\t',
                # print "%d * %d = %d"%(i,j,i*j),
            print '\n'

    def _test_count_words(self):
        """
        dd = DemoDemo()
        dd._test_count_words()
        >
        demo 2019 \t
        """
        s = raw_input("please input a string:\n")
        letters = 0
        spaces = 0
        digits = 0
        others = 0
        for c in s:
            if c.isalpha():
                letters += 1
            elif c.isspace():
                spaces += 1
            elif c.isdigit():
                digits += 1
            else:
                others += 1
        print "字母个数为： ", letters
        print "空格个数为： ", spaces
        print "数字个数为： ", digits
        print "其他字符为： ", others


if __name__ == "__main__":
    dd = DemoDemo()
    dd._test_count_words()
